import { createApp } from 'vue'
import App from './App.vue'
import { router, initRouter } from './router'
import { createPinia } from 'pinia'
import directive from './directive'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import '//at.alicdn.com/t/font_2847036_jh4zg0yih8.js' //引入iconfont图标js

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(createPinia())

directive(app)

//必须在use pinia和router之间
initRouter()

app.use(router).mount('#app')
